package com.fdb.efp.nls.service.facade;

import com.fdb.efp.nls.service.vo.LoanCompensationStatementVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface LoanCompensationStatementServiceV2 {

	int insert(LoanCompensationStatementVo loanCompensationStatementVo);

	int insertSelective(LoanCompensationStatementVo loanCompensationStatementVo);

	/* 批量插入代偿清单 */
	public int bathInsert(List<LoanCompensationStatementVo> loanCompensationStatementVos) throws Exception;

	/**
	 * 批量插入代偿明细（主键存在则更新）
	 * @param loanCompensationStatementVos
	 * @return
	 * @throws Exception
	 */
    int insertOrUpdateBath(List<LoanCompensationStatementVo> loanCompensationStatementVos) throws Exception;

    /* 根据日期查询正式表批量代偿清单 */
	public List<LoanCompensationStatementVo> queryLoanCompensationStatementByDate(LoanCompensationStatementVo loanCompensationStatementVo)
			throws Exception;

	/* 根据拮据批量更新代偿状态 */
	public int bathUpdateLoanCompensationStatement(List<LoanCompensationStatementVo> loanCompensationStatementVos) throws Exception;

	/* 查询各类本金，利息和 */
	public Map<String, BigDecimal> querySumBal(LoanCompensationStatementVo loanCompensationStatement) throws Exception;
	/**
	 * 批量通过借据号更新对账明细: <br>
	 *
	 * 0.1:caoxin:2019/4/8 19:59: TODO: <br>
	 * @author caoxin
	 * @return
	 * @since 2019/4/8 19:59
	 * @date 2019/4/8 19:59
	 * @version 0.1
	 */

	int updateBatchByBillNo(@Param("list") List<LoanCompensationStatementVo> loanCompensationStatementVos);
	/**
	 * 通过借据号更新对账明细: <br>
	 *
	 * 0.1:caoxin:2019/4/8 19:59: TODO: <br>
	 * @author caoxin
	 * @return
	 * @since 2019/4/8 19:59
	 * @date 2019/4/8 19:59
	 * @version 0.1
	 */
	int updateByBillNo(LoanCompensationStatementVo loanCompensationStatementVo);
	/**
	 * 通过对账状态和日期统计对账明细数目: <br>
	 *
	 * 0.1:caoxin:2019/4/4 9:46: TODO: <br>
	 * @author caoxin
	 * @return
	 * @since 2019/4/4 9:46
	 * @date 2019/4/4 9:46
	 * @version 0.1
	 */
	int countLoanCompensationStatementByCheckState(LoanCompensationStatementVo loanCompensationStatement);

	/**
	 * 
	 * TODO 根据日期修改对账状态<br>
	 * 0.1:wanglihua:2019年4月15日 上午11:21:27:TODO <br>
	 * @author wanglihua
	 * @since 2019年4月15日 上午11:21:27
	 * @date 2019年4月15日 上午11:21:27
	 * @version 0.1 初始为0.1,后续变更则修改
	 * @param successFlag 
	 */
	int timeUpdateLoanCompensationStatement(String curDate, String successFlag);
}
